php-Laravel check if date is passed

79

$now_date = new DateTime();
$due_date = new DateTime($project->due_date);

if ($now_date > $due_date) {
  return redirect()->route('user.projects.index')->with('warningMessage', __('cruds.project.due_date_passed'));
}

Comments

Submit
0 Comments